-
Notifications
You must be signed in to change notification settings - Fork 154
feat(idempotency): support for Redis
as idempotency backend
#3896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(idempotency): support for Redis
as idempotency backend
#3896
Conversation
…n with default expiry
…ovided Redis clients
…sistenceLayer tests
…nd add `_deleteRecord` test
Hi @arnabrahman, thank you! Yes feel free to streamline wherever applicable, especially when it comes to types. Good idea! |
… & `Redis` to extend
…fy client initialization requirements
…es` for clarity and consistency
…nt attribute handling across persistence layers
…CE_ATTRIBUTE_KEY_MAPPINGS` for clarity and consistency
…property from `DynamoDBPersistenceLayer`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @arnabrahman and @dreamorosi, I have nothing to add here, the implementation is following all the standards we observed when doing this in Python. To be honest, it's a good amount of great work, congrats.
BTW, you'll open another PR to update the documentation @dreamorosi ?
@leandrodamascena Yes, we agreed to create separate Pr for documentation. If this pr is merged, i can start on the documentation part. |
@leandrodamascena I need your review/approval again. As discussed I have renamed the new persistence layer to In terms of how to describe this new persistence layer, I have copied the wording from this page, so from now on I think we'll address this as "Valkey-, and Redis OSS-compatible". The API reference now looks like this, and shows both Glide and Redis clients: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want, just fix the typo. Approving.
Co-authored-by: Leandro Damascena <lcdama@amazon.pt>
|
Summary
This Pr adds support for using
Redis
as an idempotency backend. The implementation follows the same convention as the Python implementation of the same feature for powertoolsChanges
Redis
support for idempotency backendRedisPersistanceLayer
, this more or less follows the python implementationconsole
logging similar to the Python implementation, but I think in this project, there is no precedent for doing that. So not sure if it should stay or not.RedisConnection
class to handle Redis client creation@redis/client
package as default redis client, but the user can bring their own client to use it.Example:
When using default redis client
When using your own redis client
Issue number: #3183
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.